package com.rainbow.commons.redis;

import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author Rainbow on 2018/7/3
 */
@Component
public class RedisCache {

    @Resource
    private RedisTemplate<String, Object> redisTemplate;


    public void test() {
        redisTemplate.opsForValue().set("test", "test");

        redisTemplate.opsForValue().get("test");
    }

}
